namespace System.ComponentModel {
    
    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="TArgs1">The type of the args1.</typeparam>
    public class AsyncCompletedEventArgs<TArgs1> : AsyncCompletedEventArgs {
        /// <summary>
        /// Initializes a new instance of the <see cref="AsyncCompletedEventArgs{TArgs1}"/> class.
        /// </summary>
        /// <param name="args1">The args1.</param>
        /// <param name="exception"></param>
        /// <param name="cancelled"></param>
        /// <param name="userState"></param>
        public AsyncCompletedEventArgs(TArgs1 args1, Exception exception, bool cancelled, object userState) :
            base(exception, cancelled, userState) {

                _result = args1;
        }

        private readonly TArgs1 _result;
        /// <summary>
        /// Gets or sets the data.
        /// </summary>
        /// <value>The data.</value>
        public TArgs1 Result {
            get { 
                RaiseExceptionIfNecessary();
                return _result;
            }
        }
    }

    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="TArgs1">The type of the args1.</typeparam>
    /// <typeparam name="TArgs2">The type of the args2.</typeparam>
    public class AsyncCompletedEventArgs<TArgs1, TArgs2> : AsyncCompletedEventArgs {
        /// <summary>
        /// Initializes a new instance of the <see cref="AsyncCompletedEventArgs{TArgs1, TArgs2}"/> class.
        /// </summary>
        /// <param name="args1">The args1.</param>
        /// <param name="args2"></param>
        /// <param name="exception"></param>
        /// <param name="cancelled"></param>
        /// <param name="userState"></param>
        public AsyncCompletedEventArgs(TArgs1 args1, TArgs2 args2, Exception exception, bool cancelled, object userState) :
            base(exception, cancelled, userState) {

            _result = args1;
            _result2 = args2;
            }

        private readonly TArgs1 _result;
        /// <summary>
        /// Gets or sets the data.
        /// </summary>
        /// <value>The data.</value>
        public TArgs1 Result {
            get {
                RaiseExceptionIfNecessary();
                return _result;
            }
        }

        private readonly TArgs2 _result2;
        /// <summary>
        /// Gets or sets the data.
        /// </summary>
        /// <value>The data.</value>
        public TArgs2 Result2 {
            get {
                RaiseExceptionIfNecessary();
                return _result2;
            }
        }
    }
}